// 有多少个人是在线状态
const mongoose = require('mongoose');
const Schema = mongoose.Schema;

const SocketSchema = new Schema({
    create_time: {
        type: Date,
        default: Date.now
    },
    
    id: String,
    user: Schema.Types.ObjectId, // 当前登录用户
    ip: String
})

const Socket = mongoose.model('Socket', SocketSchema);

module.exports = Socket;